package saxion.speelveld.spaceengineer.model;

import java.io.Serializable;

import saxion.speelveld.spaceengineer.R;
import android.util.Log;

public class Tile implements Serializable
{
	private int backgroundID;

	private boolean isDirty = false;

	/**
	 * creates a tile
	 * 
	 * @param backgroundName
	 *            name of the background image in de resource drawable map;
	 */
	public Tile(int backgroundID)
	{
		this.backgroundID = backgroundID;
		if (isDirty == true)
		{
			Log.e("Tile", "Already dirty!");
		}
		isDirty = true;
		Game.setTilesUpdated(true);
	}

	public int getBackgroundID()
	{
		return R.drawable.groundtile;
	}

	public boolean isDirty()
	{
		return isDirty;
	}

	public void setDirty(boolean isDirty)
	{
		this.isDirty = isDirty;
	}
}
